package com.zzl.bonds.ticket.constant.status;

/**
 * 签署人状态
 * 签署状态：
 * 未签署	0
 * 已签署	1
 * 已拒绝	2
 * 锁定待签	3（用户用本地证书签署时使用，本项目用不到）
 * 抄送	9
 *
 * @author : gull
 * @date : 2022/2/16 15:02
 */
public enum SignerStateEnum {

    SIGNER_STATUS_UNFINISHED(0, "未签署"),
    SIGNER_STATUS_FINISHED(1, "已签署"),
    SIGNER_STATUS_REFUSE(2, "已拒绝"),
    SIGNER_STATUS_SIGNING(3, "锁定待签"),
    SIGNER_STATUS_EXPIRED(9, "抄送"),
    ;


    private final Integer code;
    private final String value;


    SignerStateEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getValue(Integer code) {
        for (SignerStateEnum statusEnum : SignerStateEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.value;
            }
        }
        return "";
    }

    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
